package com.jd.charactercalculator.dto.param;

import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * 分页查询dto
 *
 * @author:孙林
 * @since:2012上午10:35:58
 * @version:1.0.0
 */
public class PagingParamDto {

	/**
	 * 分页查询开始
	 */
	private int start;
	
	/**
	 * 分页查询，一次查询条数
	 */
	private int number;
	private int limit;
	/**
	 * 分页查询结束
	 */
	private int end;

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
        setEnd(start, limit);
	}

	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public int getEnd() {
		return end;
	}

	public void setEnd(int end) {
		this.end = end;
	}
	
    public void setEnd(int start, int limit) {
        this.end = start + limit;
    }
    
	public int getLimit() {
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
        setEnd(start, limit);
	}

	public String toString(){
		return ToStringBuilder.reflectionToString(this);
	}
	
}
